﻿using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class UnitManager : UnitySingleton<UnitManager>  {


	public List<Unit> enemies=new List<Unit>();

	public void StopGame()
	{
		enemies.Clear ();
	}

    //生成怪
	public Unit CreateEnemy(GameObject enemyTemple)
	{
		GameObject g = Instantiate (enemyTemple);
		g.transform.SetParent (this.transform);
		Unit u = g.GetComponent<Unit> ();
		enemies.Add (u);
		return u;
	}
}
